<template>
  <div>
    <!-- 数组 -->
    <ul>
      <li v-for="(val,index) in arr" :key='index'>{{val}}---{{index}}</li>
    </ul>
    <!-- 对象 -->
    <div>
      <div v-for="(item,key,index) in obj" :key="index">{{item}}--{{key}}--{{index}}</div>
    </div>
    <!-- 数字 -->
    <div>
      <div v-for="(item,index) in num" :key="index">{{item}}--{{index}}</div>
    </div>
    <!-- 字符串 -->
    <div>
      <div v-for="(item,index) in str" :key="index">{{item}}--{{index}}</div>
    </div>
    <div>
      <div v-for="(item,index) in arrObj" :key="index">{{item.name}}--{{item.age}}</div>
    </div>
  </div>
</template>

<script>
export default {  
  data(){
    return {
      arr:[1,2,3,4,5,6],
      obj:{
        name:'小白',
        age:20,
        gender:'男'
      },
      num:6,
      str:"心想事成",
      arrObj:[
        {
          name: "大明",
          age: 20
        },{
          name: "小明",
          age: 18
        }
      ]
    }
  }
}
</script>

<style>

</style>